package au.com.handsunited.service;

import java.util.List;
import java.util.Map;

import au.com.handsunited.model.BaseEntity;
import au.com.handsunited.model.Group;
import au.com.handsunited.model.User;
import au.com.handsunited.model.relationship.Role;
import au.com.handsunited.model.skill.Skill;

/**
 *
 * @author arunda
 */
public interface GroupService {

	String VALID_EMAILADDRESSES = "valid";
	String INVALID_EMAILADDRESSES = "invalid";
	String INVITED_USERS = "invitedusers";


	Group createGroup(Group group, BaseEntity owner);

	Group updateOrganisation (Group group, BaseEntity owner);

	boolean deleteGroup(Group group);

	Group getGroup (String groupID);

	List<Group> getAllGroups();

	List<Group> searchForGroups (String name, String keywords);

	void addMemberToGroup (Group group, BaseEntity member);

	void removeMemberFromGroup(Group group, BaseEntity member);

	void changeMemberRole(Group group, User admin, User member, Role newRole);

	List<Group> findGroupsWithSkills(List<Skill> skills, boolean allSkillsRequired);

	Map<String, List<String>> inviteToGroup(Group group,
			User invitingUser, List<BaseEntity> invitedEntities, String emailAddresses,
			String message);

}
